package com.zhiyou100.crm.service.impl;

import com.zhiyou100.crm.dao.DepartmentDao;
import com.zhiyou100.crm.dao.impl.DepartmentDaoImpl;
import com.zhiyou100.crm.service.DepartmentService;
import com.zhiyou100.crm.util.Department;

import java.util.List;

public class DepartmentServiceImpl implements DepartmentService {
    DepartmentDao departmentDao=new DepartmentDaoImpl();
    @Override
    public List<Department> queryAll() {
        return departmentDao.queryAll();
    }

    @Override
    public int addDepartment(Department department) {
        return departmentDao.addDepartment(department);
    }

    @Override
    public int deleteById(int departmentId) {
        return departmentDao.deleteById(departmentId);
    }

    @Override
    public int updateDepartment(Department department) {
        return departmentDao.updateDepartment(department);
    }
}
